/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: COFFEEWEN
 * Date: 2022-08-23
 * Time: 18:46
 */
public class Test {
    public static int hammingWeight(int n) {
        int ans = 0;
        for (int i = 0; i < 32; i++) {
            ans += ((n >> i) & 1);
        }
        return ans;
    }

    public static void main(String[] args) {
        int m = 0x1011;
        int n = hammingWeight(00000000000000000000000010000000);
        System.out.println(n);
    }
}
